package com.zatech.cgnci.project.base.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

@Getter
@AllArgsConstructor
public enum ContentInfoTypeEnum {
   ERROR("error","Error"), 
    PROMOPTANDCONFIRM("promoptAndConfirm","提示并需确认"),
   ; 
    
    
    private String code;
    private String descr;
    public static ContentInfoTypeEnum getEnumByCode(String code) {
        return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findAny().orElse(null);
    }

}
